Declare @StartDate date
Declare @EndDate date
Declare @CarPrice money
Declare @NoOfDays int
Declare @OneDayPrice money
Declare @MonthlyPrice money
Declare @TotalPrice money

SET @StartDate = '17-Mar-2015'
SET @CarPrice = $100000
SET @EndDate = DateAdd(year, 10, @StartDate)
SET @NoOfDays = DateDiff(day, GetDate(), @EndDate)
SET @OneDayPrice = @CarPrice/@NoOfDays
SET @MonthlyPrice = @OneDayPrice * 30 + ((1200+604)/12)
SET @OneDayPrice = @MonthlyPrice / 30
Select @NoOfDays, @NoOfDays/365.25 NoOfYear,@OneDayPrice * 7 WeeklyPrice, @OneDayPrice OnDayPrice, @MonthlyPrice MonthlyPrice
